﻿@using Ec_System.Facade.Web
@{
    Layout = null;
    var imageServer = new SiteConfigFacade().ImageServer;
}
@model Ec_System.Models.Web.CustomerData

<div class="AreaR2">
    <div class="box">
        <div class="box_1">

            @if (string.IsNullOrWhiteSpace(Model.RealName))
            {
                <div class="userCenterBox boxCenterList clearfix" style="_height:1%;">
                    <font class="f5"><b class="f4">您还没有完善个人信息，请在【用户编辑】完善个人信息！</b> </font><br />
                </div>
            }
            else
            {
                <div class="userCenterBox boxCenterList clearfix" style="_height:1%;">
                    <font class="f5"><b class="f4">@Model.RealName</b> 欢迎您回到果蔬汇(guoshuihui.com)！</font><br />
                    <div class="blank5"></div>
                    <div style="margin:5px 0; border:1px solid #f7dd98;padding:10px 20px; background-color:#fffad5;">
                        <img src="/Content/images/note.gif" alt="note" />&nbsp;您的等级：<span class="star_@Model.LevelNum"></span>  &nbsp;&nbsp;&nbsp;&nbsp; 您的积分：@Model.LevelPoint 分
                    </div>
                    <div class="blank5"></div>
                    <div style="margin:5px 0; border:1px solid #f7dd98;padding:10px 20px; background-color:#fffad5;">
                        <img src="/Content/images/note.gif" alt="note" />&nbsp;收货地址： @Model.OrderList.Select(p => p.Address)
                    </div>


                    <div class="blank5"></div>
                    <div style="margin:5px 0; border:1px solid #f7dd98;padding:10px 20px; background-color:#fffad5;">
                        <img src="/Content/images/note.gif" alt="note" />&nbsp;账户余额： @Model.BalanceMoney.ToString("C") 元  消费金额：@Model.TotalMoney.ToString("C") 元
                    </div>

                    <div class="blank5"></div>
                    <div style="margin:5px 0; border:1px solid #f7dd98;padding:10px 20px; background-color:#fffad5;">
                        <img src="/Content/images/note.gif" alt="note" />&nbsp;当前订单
                        <div class="blank5"></div>
                        @for (int i = 0; i < Model.OrderList.Count; i = i + 1)
                        {
                            <div style="text-align:left;height:38px;background-color:#e1ddd5;">
                                <span style="font-size:16px;padding:5px">
                                    @Model.OrderList[i].InDate &nbsp;
                                    订单编号：<b>@Model.OrderList[i].OrderId</b> &nbsp;
                                    订单状态：@Model.OrderList[i].ShowOrderStatus &nbsp;
                                    订单金额：@Model.OrderList[i].FactMoney.ToString("C") &nbsp;
                                    节省：@Model.OrderList[i].ShowDiscount.ToString("C")  &nbsp;&nbsp;
                                </span>
                            </div>
                            <table width="100%" cellpadding="5" cellspacing="0" border="0" align="center">
                                <tr style="height:40px; border-style: solid; border-width: 1px; border-color: #f6f5f6; background-color: #f6f5f5;">
                                    <td align="center" valign="middle" colspan="2">商品</td>
                                    <td align="center" valign="middle" width="60">价格</td>
                                    <td align="center" valign="middle" width="60">数量</td>
                                    <td align="center" valign="middle" width="60">单位</td>
                                    <td align="center" valign="middle" width="60">金额</td>
                                    <td align="center" valign="middle" width="60">状态</td>
                                    <td align="center" valign="middle" width="120" colspan="3">操作</td>
                                </tr>
                                @for (int n = 0; n < Model.OrderList[i].OrderList.Count; n++)
                                {
                                    <tr>
                                        <td align="left" valign="middle" width="85">
                                            <a href="/Item/@Model.OrderList[i].OrderList[n].ProductID">
                                                <img src="@imageServer/product/260260/@Model.OrderList[i].OrderList[n].ImageUrl" width="80" height="80" />
                                            </a>
                                        </td>
                                        <td align="left" valign="middle">
                                            <a href="/Item/@Model.OrderList[i].OrderList[n].ProductID">
                                                @Model.OrderList[i].OrderList[n].ShopProductTitle
                                            </a><br />
                                            <a href="/Item/@Model.OrderList[i].OrderList[n].ProductID">
                                                @Model.OrderList[i].OrderList[n].SecondTitle
                                            </a>
                                        </td>
                                        <td align="center" valign="middle">
                                            @Model.OrderList[i].OrderList[n].UnitPrice.ToString("C")
                                        </td>
                                        <td align="center" valign="middle">
                                            @Model.OrderList[i].OrderList[n].Count
                                        </td>
                                        <td align="center" valign="middle">
                                            @Model.OrderList[i].OrderList[n].Unit
                                        </td>
                                        <td align="center" valign="middle">
                                            @Model.OrderList[i].OrderList[n].FactMoney.ToString("C")
                                        </td>
                                        <td align="center" valign="middle">
                                            <span id="spanReturnMark@{@Model.OrderList[i].OrderList[n].ID}">@Model.OrderList[i].OrderList[n].ShowReturnMark</span>
                                        </td>
                                        <td align="center" valign="middle" width="60">
                                            <a href="/Item/@Model.OrderList[i].OrderList[n].ProductID" target="_blank">再次购买</a>
                                        </td>
                                    </tr>
    }
                            </table>
    }
                    </div>
                </div>
    }
        </div>
    </div>
</div>
<div class="blank"></div>